package com.norra.base.api.entity

import com.google.gson.annotations.SerializedName


class ModifyBinInfoRequest {
    @SerializedName("DeviceId")
    var deviceId: Long? = null

    @SerializedName("Name")
    var name: String? = null

    @SerializedName("Longtitude")
    var lng: Double? = null

    @SerializedName("Latitude")
    var lat: Double? = null

    @SerializedName("Address")
    var address: String? = null

    @SerializedName("Color")
    var color: String? = null

    @SerializedName("Condition ")
    var condition : Float? = null

    @SerializedName("Model")
    var model: String? = null
}

class AndroidType {
    @SerializedName("phoneType")
    var phoneType = "Android"
}



class UpdateBinRequest {

    @SerializedName("BinId")
    var binId: Long = 0

    @SerializedName("District")
    var district: String? = null

    @SerializedName("time")
    var time: String? = null


    /**
     * cleanType
     * 1	cleaned
     * 2	Need to be cleaned
     * 3	Covered with graffiti
     * 4	damaged
     * 5	burned
     * 6	moved
     * 7	repaired
     * 8	Pressed
     * 9    Sensor error
     * 10   Lost sensor
     * 11   Illegal trash
     * 12   Trash overflow
     */
    @SerializedName("CleanType")
    var cleanType: Int = 0

    companion object {
        //{"BinId":10, "District":"Centrum", "time":"2019-01-09T00:01:01Z"}

        const val CLEANED = 1
        const val NEED_TO_CLEAN = 2
        const val COVERED_GRAFFITI = 3
        const val DAMAGED = 4
        const val BURNED = 5
        const val MOVED = 6
        const val REPAIRED = 7
        const val PRESSED = 8
        const val SENSOR_ERROR = 9
        const val SENSOR_LOST = 10
        const val ILLEGAL_TRASH = 11
        const val TRASH_OVERFLOW = 12
    }
}


class AddNoteRequest(@SerializedName("Note") val note: String, @SerializedName("DeviceId") val deviceId: Long)

class BinRequest(@SerializedName("deviceId") val deviceId: Long)

class UpdatePercentRequest(@SerializedName("deviceId") val deviceId: Long, @SerializedName("percentage") val percentage: Int)

class NoteRequest {

    constructor(deviceId: Long, days: Int) {
        this.deviceId = deviceId
        this.days = days
    }

    @SerializedName("DeviceId")
    val deviceId: Long

    @SerializedName("Days")
    val days: Int //0 最新一条记录  >0 days天的记录  -1 所有记录

}

class RepairNoteRequest {

    constructor(binId: Long, district: String, time: String, cleanTypes: List<Int>, note: String) {
        this.binId = binId
        this.district = district
        this.time = time
        this.cleanTypeArray = cleanTypes
        this.statusNote = note
    }

    @SerializedName("BinId")
    val binId: Long

    @SerializedName("District")
    val district: String

    @SerializedName("time")
    val time: String

    @SerializedName("CleanTypeArray")
    val cleanTypeArray: List<Int>

    @SerializedName("statusNote")
    val statusNote: String
}

class RepairType {

    companion object {
        const val CLEANED = 1
        const val NEED_TO_CLEAN = 2
        const val GRAFFITIED = 3
        const val DAMAGED = 4
        const val BURNED = 5
        const val MOVED = 6
        const val REPAIRED = 7
        const val PRESSED = 8
        const val SENSOR_ERROR = 9
        const val SENSOR_LOST = 10
        const val ILLEGAL_TRASH = 11
        const val TRASH_OVER = 12


        const val CLEAN_GRAFFITI = -3
        const val REPAIR_DAMAGED = -4
        const val REPAIR_BURNED = -5
        const val MOVE_BACK = -6
        const val REPAIR_SENSOR = -9
        const val NEW_SENSOR = -10

        // 暂时没用到
        val MOVE_ILLEGAL_TRASH = -11
        val MOVE_OVERFLOW_TRASH = -12
    }

}

